package org.vs.test.contract;

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.Bool;
import org.web3j.abi.datatypes.Function;
import org.web3j.abi.datatypes.Type;
import org.web3j.abi.datatypes.generated.Bytes32;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.RemoteCall;
import org.web3j.protocol.core.RemoteFunctionCall;
import org.web3j.protocol.core.methods.response.TransactionReceipt;
import org.web3j.tx.Contract;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;

/**
 * <p>Auto generated code.
 * <p><strong>Do not modify!</strong>
 * <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
 * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the 
 * <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
 *
 * <p>Generated with web3j version 1.5.0.
 */
@SuppressWarnings("rawtypes")
public class __ZKP01_sol_ZKP01 extends Contract {
    public static final String BINARY = "608060405234801561001057600080fd5b50610642806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806362e9aeba1461006757806394fb6466146100905780639867db7414610098578063b411ee94146100ad578063b8fe2a82146100cd578063c7085969146100d5575b600080fd5b61007a610075366004610427565b6100e8565b60405161008791906105a4565b60405180910390f35b61007a6100fc565b6100ab6100a63660046103ec565b610145565b005b6100c06100bb3660046103ec565b61015c565b60405161008791906104b6565b6100c061018c565b61007a6100e336600461046a565b61028c565b6000816100f48461015c565b149392505050565b60408051808201909152600981526861626358595a21402360b81b602082015260009061012881610145565b600061013e8261013661018c565b60025461028c565b9250505090565b80516101589060009060208401906102d2565b5050565b60008160405160200161016f91906104bf565b604051602081830303815290604052805190602001209050919050565b600042446040516020016101a1929190610596565b60408051601f1981840301815290829052805160209182012060028190556101cc92600092016104f8565b604051602081830303815290604052600190805190602001906101f09291906102d2565b50600061028660018054610203906105bb565b80601f016020809104026020016040519081016040528092919081815260200182805461022f906105bb565b801561027c5780601f106102515761010080835404028352916020019161027c565b820191906000526020600020905b81548152906001019060200180831161025f57829003601f168201915b505050505061015c565b91505090565b6000808260001b84186040516020016102a591906104b6565b60405160208183030381529060405290506102bf8161015c565b6102c88661015c565b1495945050505050565b8280546102de906105bb565b90600052602060002090601f0160209004810192826103005760008555610346565b82601f1061031957805160ff1916838001178555610346565b82800160010185558215610346579182015b8281111561034657825182559160200191906001019061032b565b50610352929150610356565b5090565b5b808211156103525760008155600101610357565b600082601f83011261037b578081fd5b813567ffffffffffffffff80821115610396576103966105f6565b604051601f8301601f1916810160200182811182821017156103ba576103ba6105f6565b6040528281528483016020018610156103d1578384fd5b82602086016020830137918201602001929092529392505050565b6000602082840312156103fd578081fd5b813567ffffffffffffffff811115610413578182fd5b61041f8482850161036b565b949350505050565b60008060408385031215610439578081fd5b823567ffffffffffffffff81111561044f578182fd5b61045b8582860161036b565b95602094909401359450505050565b60008060006060848603121561047e578081fd5b833567ffffffffffffffff811115610494578182fd5b6104a08682870161036b565b9660208601359650604090950135949350505050565b90815260200190565b60008251815b818110156104df57602081860181015185830152016104c5565b818111156104ed5782828501525b509190910192915050565b825460009081906002810460018083168061051457607f831692505b602080841082141561053457634e487b7160e01b87526022600452602487fd5b818015610548576001811461055957610585565b60ff19861689528489019650610585565b6105628b6105af565b885b8681101561057d5781548b820152908501908301610564565b505084890196505b509785525050509301949350505050565b918252602082015260400190565b901515815260200190565b60009081526020902090565b6002810460018216806105cf57607f821691505b602082108114156105f057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220f91b675934b0ea2a79a9340e3e10b696a25209b692d45377511efe39b94b97b364736f6c63430008000033";

    public static final String FUNC_COMMIT = "commit";

    public static final String FUNC_GENERATECOMMITMENT = "generateCommitment";

    public static final String FUNC_HASH = "hash";

    public static final String FUNC_TESTZKP = "testZKP";

    public static final String FUNC_VERIFY = "verify";

    public static final String FUNC_VERIFYZKP = "verifyZKP";

    @Deprecated
    protected __ZKP01_sol_ZKP01(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    protected __ZKP01_sol_ZKP01(String contractAddress, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, credentials, contractGasProvider);
    }

    @Deprecated
    protected __ZKP01_sol_ZKP01(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    protected __ZKP01_sol_ZKP01(String contractAddress, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public RemoteFunctionCall<TransactionReceipt> commit(String _token) {
        final Function function = new Function(
                FUNC_COMMIT, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(_token)), 
                Collections.<TypeReference<?>>emptyList());
        return executeRemoteCallTransaction(function);
    }

    public RemoteFunctionCall<TransactionReceipt> generateCommitment() {
        final Function function = new Function(
                FUNC_GENERATECOMMITMENT, 
                Arrays.<Type>asList(), 
                Collections.<TypeReference<?>>emptyList());
        return executeRemoteCallTransaction(function);
    }

    public RemoteFunctionCall<byte[]> hash(String _token) {
        final Function function = new Function(FUNC_HASH, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(_token)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
        return executeRemoteCallSingleValueReturn(function, byte[].class);
    }

    public RemoteFunctionCall<TransactionReceipt> testZKP() {
        final Function function = new Function(
                FUNC_TESTZKP, 
                Arrays.<Type>asList(), 
                Collections.<TypeReference<?>>emptyList());
        return executeRemoteCallTransaction(function);
    }

    public RemoteFunctionCall<Boolean> verify(String _token, byte[] _commitment) {
        final Function function = new Function(FUNC_VERIFY, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(_token), 
                new org.web3j.abi.datatypes.generated.Bytes32(_commitment)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        return executeRemoteCallSingleValueReturn(function, Boolean.class);
    }

    public RemoteFunctionCall<Boolean> verifyZKP(String _token, byte[] _commitment, BigInteger _r) {
        final Function function = new Function(FUNC_VERIFYZKP, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.Utf8String(_token), 
                new org.web3j.abi.datatypes.generated.Bytes32(_commitment), 
                new org.web3j.abi.datatypes.generated.Uint256(_r)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        return executeRemoteCallSingleValueReturn(function, Boolean.class);
    }

    @Deprecated
    public static __ZKP01_sol_ZKP01 load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new __ZKP01_sol_ZKP01(contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    @Deprecated
    public static __ZKP01_sol_ZKP01 load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new __ZKP01_sol_ZKP01(contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    public static __ZKP01_sol_ZKP01 load(String contractAddress, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        return new __ZKP01_sol_ZKP01(contractAddress, web3j, credentials, contractGasProvider);
    }

    public static __ZKP01_sol_ZKP01 load(String contractAddress, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return new __ZKP01_sol_ZKP01(contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public static RemoteCall<__ZKP01_sol_ZKP01> deploy(Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
        return deployRemoteCall(__ZKP01_sol_ZKP01.class, web3j, credentials, contractGasProvider, BINARY, "");
    }

    @Deprecated
    public static RemoteCall<__ZKP01_sol_ZKP01> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(__ZKP01_sol_ZKP01.class, web3j, credentials, gasPrice, gasLimit, BINARY, "");
    }

    public static RemoteCall<__ZKP01_sol_ZKP01> deploy(Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return deployRemoteCall(__ZKP01_sol_ZKP01.class, web3j, transactionManager, contractGasProvider, BINARY, "");
    }

    @Deprecated
    public static RemoteCall<__ZKP01_sol_ZKP01> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(__ZKP01_sol_ZKP01.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "");
    }
}
